﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ManterVideo.aspx.cs" Inherits="ManterVideo" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="demoheading" style="width:390px; height: 21px;">Manter Vídeo</div>
     <asp:Panel ID="Panel2" runat="server" CssClass="collapsePanelHeader" 
        Height="20px" Width="172px">
                    <div style=" padding: 5px; cursor: pointer; vertical-align: middle; width: 167px;">
                        <div style="float: left;">Consultar Vídeo</div>
                    </div>
                </asp:Panel>
    <div style="width:400px">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                AutoGenerateColumns="False" BackColor="White" BorderColor="#DEDFDE" 
                BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" 
                GridLines="Vertical" DataSourceID="obsVideo">
                <FooterStyle BackColor="#CCCC99" />
                <RowStyle BackColor="#F7F7DE" />
                <Columns>
                    <asp:BoundField DataField="Codigo" HeaderText="Codigo" 
                        SortExpression="Codigo" />
                    <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
                    <asp:BoundField DataField="Localizacao" HeaderText="Localizacao" 
                        SortExpression="Localizacao" />
                    <asp:TemplateField HeaderText="Atualizar/Remover">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbAtualiza" runat="server" onclick="lbAtualiza_Click">Atualizar</asp:LinkButton>
                            &nbsp;
                            <asp:LinkButton ID="lbRemove" runat="server" onclick="lbRemove_Click">Remover</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <EmptyDataTemplate>
                    <asp:LinkButton ID="lbAtualiza" runat="server">Atualizar</asp:LinkButton>
                    &nbsp;<asp:LinkButton ID="lbRemove" runat="server">Remover</asp:LinkButton>
                </EmptyDataTemplate>
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
        </ContentTemplate>
             </asp:UpdatePanel>
        </div>     
        <asp:ObjectDataSource ID="obsVideo" runat="server" 
        DataObjectTypeName="Negocios.Video" DeleteMethod="Excluir" 
        InsertMethod="Insere" OldValuesParameterFormatString="original_{0}" 
        SelectMethod="ConsultarPorUsuario" TypeName="Negocios.VideoBLL" 
        UpdateMethod="Atualizar">
            <SelectParameters>
                <asp:Parameter DefaultValue="teste" Name="usuario" Type="String" />
            </SelectParameters>
    </asp:ObjectDataSource>
        <br />
         <asp:Panel ID="Panel1" runat="server" CssClass="collapsePanelHeader" 
        Height="20px" Width="400px">
                    <div style=" padding: 5px; cursor: pointer; vertical-align: middle; width: 392px;">
                        <div style="float: left;"></div>
                    </div>
                </asp:Panel>
        <div style="width:400px">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <table style="width: 400px" class="divDados">
                <tr class="divOID">
                    <td style="width: 93px">
                        <asp:Label ID="lbCodigo" runat="server" Text="Código" Enabled="False"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbCodigo" runat="server"></asp:TextBox>
                        <asp:Button ID="btNovo" runat="server" Text="Novo" onclick="btNovo_Click" />
                    </td>
                </tr>
                <tr>
                    <td style="width: 93px">
                        <asp:Label ID="lbnome" runat="server" Text="Nome"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbNome" runat="server" Enabled="False"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 93px">
                        <asp:Label ID="lbLocalizacao" runat="server" Text="Localização"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbLocalizacao" runat="server" Enabled="False"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="width: 93px">
                        <asp:Label ID="lbGenero" runat="server" Text="Genero"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlGenero" runat="server" AppendDataBoundItems="True" 
                            DataSourceID="odsGenero" DataTextField="Nome" DataValueField="Codigo" 
                            Enabled="False">
                            <asp:ListItem Value="0">Selecione o Gênero</asp:ListItem>
                        </asp:DropDownList>
                        <asp:ObjectDataSource ID="odsGenero" runat="server" 
                            DataObjectTypeName="Negocios.Genero" DeleteMethod="Remover" 
                            InsertMethod="Inserir" OldValuesParameterFormatString="original_{0}" 
                            SelectMethod="ConsultarTodos" TypeName="Negocios.GeneroBLL" 
                            UpdateMethod="Atualizar"></asp:ObjectDataSource>
                    </td>
                </tr>
                <tr>
                    <td style="width: 93px">
                        Autor</td>
                    <td>
                        <asp:DropDownList ID="ddlAutor" runat="server" AppendDataBoundItems="True" 
                            DataSourceID="odsAutor" DataTextField="Nome" DataValueField="Codigo" 
                            Enabled="False">
                            <asp:ListItem Value="0">Selecione o Autor</asp:ListItem>
                        </asp:DropDownList>
                        <asp:ObjectDataSource ID="odsAutor" runat="server" 
                            DataObjectTypeName="Negocios.Autor" DeleteMethod="Remove" InsertMethod="Insere" 
                            OldValuesParameterFormatString="original_{0}" SelectMethod="ConsultaTodos" 
                            TypeName="Negocios.AutorBLL" UpdateMethod="Atualiza"></asp:ObjectDataSource>
                    </td>
                </tr>
                <tr>
                    <td style="width: 93px">
                        <asp:Label ID="lbFormato" runat="server" Text="Formato"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlFormato" runat="server" AppendDataBoundItems="True" 
                            DataSourceID="obsFormato" DataTextField="Nome" DataValueField="Codigo" 
                            Enabled="False">
                            <asp:ListItem Value="0">selecione o Formato</asp:ListItem>
                        </asp:DropDownList>
                        <asp:ObjectDataSource ID="obsFormato" runat="server" 
                            DataObjectTypeName="Negocios.Formato" DeleteMethod="Remove" 
                            InsertMethod="Insere" OldValuesParameterFormatString="original_{0}" 
                            SelectMethod="ConsultaTodos" TypeName="Negocios.FormatoBLL" 
                            UpdateMethod="Atualiza"></asp:ObjectDataSource>
                    </td>
                </tr>
                <tr>
                    <td style="width: 93px">
                        <asp:Label ID="lbEspecificacao" runat="server" Enabled="False" 
                            Text="Especificacão"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlEspecificacao" runat="server" Enabled="False" 
                            AppendDataBoundItems="True" DataSourceID="odsEspecificacao" 
                            DataTextField="Nome" DataValueField="Id">
                            <asp:ListItem Value="0">Selecione o tipo</asp:ListItem>
                        </asp:DropDownList>
                        <asp:ObjectDataSource ID="odsEspecificacao" runat="server" 
                            DataObjectTypeName="Negocios.Especificacao" DeleteMethod="Excluir" 
                            InsertMethod="Insere" OldValuesParameterFormatString="original_{0}" 
                            SelectMethod="ConsultaTodosVisao" TypeName="Negocios.EspecificacaoBLL" 
                            UpdateMethod="Atualizar"></asp:ObjectDataSource>
                    </td>
                </tr>
                <tr>
                    <td style="width: 93px">
                        <asp:Label ID="lbSoftware" runat="server" Text="Software"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlSoftware" runat="server" AppendDataBoundItems="True" 
                            DataSourceID="odsSoftware" DataTextField="Nome" DataValueField="Codigo" 
                            Enabled="False">
                            <asp:ListItem Value="0">selecione o software</asp:ListItem>
                        </asp:DropDownList>
                        <asp:ObjectDataSource ID="odsSoftware" runat="server" 
                            DataObjectTypeName="Negocios.SoftwareDeReproducao" DeleteMethod="Excluir" 
                            InsertMethod="Insere" OldValuesParameterFormatString="original_{0}" 
                            SelectMethod="ConsultaTodos" TypeName="Negocios.Software_De_ReproducaoBLL" 
                            UpdateMethod="Atualizar"></asp:ObjectDataSource>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="btGravar" runat="server" Text="Gravar" Enabled="False" 
                            style="height: 26px" onclick="btGravar_Click" />
                        <asp:Button ID="btCancelar" runat="server" Text="Cancelar" Enabled="False" 
                            onclick="btCancelar_Click" />
                    </td>
                </tr>
            </table>
             <asp:Label ID="lbErro" runat="server"></asp:Label>
          </ContentTemplate>  
             </asp:UpdatePanel>
        </div>
   
</asp:Content>

